package org.megha.blog.example.part5;

/** A square shape */
public class Square implements Shape {

	private double side;

	public Square(double side) {
		this.side = side;
	}

	public double area() {
		return side * side;
	}

	public double perimeter() {
		return 4 * side;
	}

	@Override
	public String toString() {
		return "square of side " + side;
	}
}
